home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / StormMesa / include / GL / svgamesa.h < prev    next >
C/C++ Source or Header  |  1998-12-15  |  3KB  |  104 lines

  1. /* $Id: svgamesa.h,v 3.0 1998/02/20 05:07:24 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  3.0
  6.  * Copyright (C) 1995-1998  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: svgamesa.h,v $
  26.  * Revision 3.0  1998/02/20 05:07:24  brianp
  27.  * initial rev
  28.  *
  29.  */
  30.  
  31.  
  32.  
  33. /*
  34.  * SVGA/Mesa interface for Linux.
  35.  */
  36.  
  37.  
  38. /*
  39.  * Intro to using the VGA/Mesa interface
  40.  *
  41.  * 1. #include the <vga.h> file
  42.  * 2. Call vga_init() to initialize the SVGA library.
  43.  * 3. Call vga_setmode() to specify the screen size and color depth.
  44.  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
  45.  *    color Mesa assumes color index mode, if using 16-bit or deeper color
  46.  *    Mesa assumes RGB mode.
  47.  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  48.  * 6. You can now use the Mesa API functions.
  49.  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  50.  *    to restore the original text screen.
  51.  *
  52.  * Notes
  53.  * 1. You must run your executable as root (or use the set UID-bit) because
  54.  *    the SVGA library requires it.
  55.  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
  56.  *    has to be done yet.
  57.  */
  58.  
  59.  
  60. #ifndef SVGAMESA_H
  61. #define SVGAMESA_H
  62.  
  63.  
  64. #define SVGAMESA_MAJOR_VERSION 3
  65. #define SVGAMESA_MINOR_VERSION 0
  66.  
  67.  
  68. #ifdef __cplusplus
  69. extern "C" {
  70. #endif
  71.  
  72.  
  73. #include "GL/gl.h"
  74.  
  75.  
  76.  
  77. /*
  78.  * This is the SVGAMesa context 'handle':
  79.  */
  80. typedef struct svgamesa_context *SVGAMesaContext;
  81.  
  82.  
  83.  
  84. /*
  85.  * doubleBuffer flag new in version 2.4
  86.  */
  87. extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
  88.  
  89. extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
  90.  
  91. extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
  92.  
  93. extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
  94.  
  95. extern void SVGAMesaSwapBuffers( void );
  96.  
  97.  
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101.  
  102.  
  103. #endif
  104.